package com.domain;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

public class User {

	@NotNull(message = "字段不能为空")
    private Integer id;
    private String username;
    @Length(min=6,message = "密码长度至少为6位")
    private String password;


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
